package proyecto;

public class Pair{
	   private int first=0;//first member of pair
	   private int second=0;//second member of pair

	   public Pair(int first, int second){
	     this.first = first;
	     this.second = second;
	   }

	   public void setFirst(int first){
	    this.first = first;
	   }

	   public void setSecond(int second) {
	     this.second = second;
	   }

	   public int getFirst() {
	     return this.first;
	   }

	   public int getSecond() {
	     return this.second;
	   }
	   
	   @Override
	   public boolean equals(Object o) {
		   if (o == null)
			   return false;
		   if (o == this)
			   return true;
		   if (!(o instanceof Pair))
			   return false;
		   
		   Pair c = (Pair) o;
		   if (this.getFirst() != c.getFirst())
			   return false;
		   if (this.getSecond() != c.getSecond())
			   return false;
		   return true;
	   }
	}